package com.mkvld.appietijdenv2.adapters;

import com.mkvld.appietijdenv2.fragments.FragInfoViewV9;

import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

public class AdapInfoFrags extends FragmentPagerAdapter {
	String[] items;
	Context context;
	public AdapInfoFrags(FragmentManager fm, Context context, String[] items) {
		super(fm);
		this.context = context;
		this.items = items;
	}

	@Override
	public Fragment getItem(int position) {
		FragInfoViewV9 frag = new FragInfoViewV9();
		Bundle args = new Bundle();
		args.putString(FragInfoViewV9.ARG_PAGE, items[position]);
		frag.setArguments(args);
		return frag;
	}
	
	@Override
	public CharSequence getPageTitle(int position) {
		return items[position];
	}

	@Override
	public int getCount() {
		return items.length;
	}
}
